<?php
class Success implements State {
    protected $state_name;
    public function __construct()
    {
        $this->state_name = "成功时";
    }

    public function WomanAction(Woman $woman)
    {
        echo "<br>{$woman->getName()}{$this->state_name}：背后有一个失败的男人<br>";
    }
    public function ManAction(Man $man)
    {
        echo "<br>{$man->getName()}{$this->state_name}：背后有一个好女人<br>";
    }
}